package com.zp.drug.service;

import com.zp.common.myBatis.core.page.PageQuery;
import com.zp.common.myBatis.core.page.TableDataInfo;
import com.zp.drug.entity.bo.DrugInventoryCheckBo;
import com.zp.drug.entity.vo.DrugInventoryCheckVo;

import java.util.Collection;
import java.util.List;

/**
 * 药品盘点表Service接口
 *
 * @author zhang peng
 * @ date 2024-06-14
 */
public interface IDrugInventoryCheckService {

    /**
     * 查询药品盘点表
     */
    DrugInventoryCheckVo queryById(String id);

    /**
     * 查询药品盘点表列表(分页)
     */
    TableDataInfo<DrugInventoryCheckVo> queryPageList(DrugInventoryCheckBo bo, PageQuery pageQuery);

    /**
     * 查询药品盘点表列表(不分页)
     */
    List<DrugInventoryCheckVo> queryList(DrugInventoryCheckBo bo);

    /**
     * 修改药品盘点表
     */
    Boolean insertByBo(DrugInventoryCheckBo bo);

    /**
     * 修改药品盘点表
     */
    Boolean updateByBo(DrugInventoryCheckBo bo);

    /**
     * 校验并批量删除药品盘点表信息
     */
    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);

    /**
     * 通过盘点号删除
     *
     * @param inventoryNo
     * @return
     */
    Boolean deleteWithValidByInventoryNo(String inventoryNo, String orgId);

    /**
     * 按申请单分组查询盘点记录
     *
     * @param bo
     * @return
     */
    TableDataInfo<DrugInventoryCheckVo> selectGroupInventoryNo(DrugInventoryCheckBo bo, PageQuery pageQuery);

    /**
     * 库存调整
     *
     * @param inventoryNo
     * @param orgId
     * @return
     */
    Boolean stockAdjust(String inventoryNo, String orgId);
}
